import axios from '@/utils/axios'

interface LoginParmas {
  account: string;
  password: string;
}

interface LoginResponse {
  token: string;
  name: string;
  role: string | string[];
}

export function login (data: LoginParmas): Promise<LoginResponse> {
  return axios.post('/login', data)
}
